home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 Applications 1996 May / SGI IRIX 6.2 Applications 1996 May.iso / dist / impr_dev.idb / usr / impressario / src / models / laserjet_model.README.z / laserjet_model.README
Text File  |  1996-05-06  |  6KB  |  135 lines

  1. TITLE: README for template model file
  2. =====================================
  3.  
  4. Purpose Of This README File:
  5. ----------------------------
  6.  
  7. This README file describes the conventions and tools used in the
  8. template model file you see in this directory.  The purpose of this
  9. file is to point out some things which would be too long to explain in
  10. a working shell file.
  11.  
  12. Model files are the interface between the spooling system and the
  13. printer.  Typically, a model file is a shell script which invokes a
  14. number of programs to format and print files.  The programs invoked by
  15. a model file are called filters if they simply change the format of a
  16. data file.  Programs invoked by a model file are called drivers if
  17. they send data to a printer and read and write to the POD Printer
  18. Object Database files.  In some cases a driver may perform filtering
  19. in addition to its primary task of sending data to a printer.  
  20.  
  21. When invoked, a model file requires a number of command line
  22. parameters.  In addition, a number of optional parameters may be
  23. specified.  This specification documents the syntax and function of
  24. both the required and optional command line parameters for a standard
  25. model file.  Developers are free to add command line parameters to the
  26. model file as long as they do not conflict with the options specified
  27. in this document.  All options must be lower-case only and should
  28. allow specification both with and without a leading dash.
  29.  
  30. NOTE: For additional information, please see the Impressario
  31. Programming Guide and the appropriate manual pages.
  32.  
  33. NOTE: The template_model file is a link to the laserjetpjl_model file.
  34. The laserjetpjl_model is a working example of a full model file and as
  35. such serves as a good example as well as a debugged template.
  36. PostScript printer developers should also look at the
  37. laserwriter_model file installed in ~lp/model with Impressario.
  38.  
  39. General Information:
  40. --------------------
  41.  
  42. Also note that wherever you MUST change something for your printer,
  43. you should find an "XXX".  Search for them to see what you'll change.
  44.  
  45. Change the first line of the model file to '#!/bin/sh -x' for
  46. debugging output.  See the sh(1) man page for more information on
  47. debugging Bourne Shell programs.  Note that all model files must use
  48. the Bourne Shell for Impressario compliance.
  49.  
  50. Comments And The DEVICE=, NAME=, TYPE=, GUI_CLASS= Fields:
  51. ----------------------------------------------------------
  52.  
  53. The printer administration tools use the DEVICE= field and NAME= field
  54. to decide which printers to show in the install tool lists.  
  55.  
  56. The list of supported devices in Impressario is 
  57.     CENTRONICS, SERIAL, SCSI, NETPRINTER, REMOTE
  58. Note that REMOTE should not be used by developer interfaces: it is
  59. only for networked System VR3 printers and has special meanings to the
  60. printer administration tools.  Do not touch or modify the 'netface'
  61. model file.
  62.  
  63. The following types are obsolete and should not be used:
  64.     TEK, VERSATEC
  65.  
  66. The TYPE= field is used by all tools which need to know the type of
  67. printer.
  68.  
  69. The list of supported types in Impressario is: 
  70.      Raster, ColorRaster, ColorPostScript, and MonoPostScript.
  71. The following types are obsolete and should not be used:
  72.      Dumb, DumbColor, Plotter, and PostScript
  73.  
  74. The install tool inserts the chosen NAME= into the blank NAME= field
  75. in the model file.  It also replaces any OPTIONS= fields with the
  76. values listed in the model file comments.  The meaning of OPTIONS=
  77. fields are printer specific.  
  78.  
  79. The GUI_CLASS= must be set to the Xt class name of the graphical options
  80. panel program that accompanies the model file. The following must all
  81. match the string assigned to GUI_CLASS=:
  82.  
  83. 1. The string assigned to GUI_CLASS in the printer model file.
  84.  
  85. 2. The graphical option panel program Xt class name.
  86.  
  87. 3. The string assigned to the GUI_CLASS define in the option
  88.    panel program file gui_class.h.
  89.  
  90. 4. The name of the option panel app-defaults file in /usr/lib/X11/app-defaults.
  91.  
  92. It is important that the format of the commenting and NAME=, TYPE=
  93. GUI_CLASS lines be left intact. They must be formatted as they are
  94. in order to allow existing tools to parse and replace those fields.
  95. See the template model file for details.
  96.  
  97. Variable Declaration Conventions:
  98. ---------------------------------
  99.  
  100. By convention, only those variables which are exported are in ALL
  101. CAPS, while those local to the model file are in lower case.  Be aware
  102. that variable names in Bourne shell programs are case-sensitive.
  103.  
  104. IMPORTANT NOTE: Variable names that are in ALL CAPITAL LETTERS are
  105. used by other programs to which you may not have access.  DO NOT
  106. CHANGE THESE VARIABLE NAMES!  The ones that are exported are used by
  107. filters in the fileconvert(1) CONVERT rules, and some are used by
  108. install tools, but all are important.
  109.  
  110. Note that variables listed in ALL CAPS should be followed immediately
  111. by an "export VARIABLE" so that the variable is added to the export
  112. list of the Bourne Shell.  This way all subsequent commands executed
  113. from this shell or any subshell will have this variable set in their
  114. environment. 
  115.  
  116. Exitcode Conventions:
  117. ---------------------
  118.  
  119. Model files should exit with the following exit codes when these
  120. errors are detected.  Do not exit with an error code not on this list.
  121.  
  122. 0 = no error
  123. 1 = an error of indeterminate nature (not listed below)
  124.     If you detect an error which is not in this list, exit with error
  125.     code 1.  Do not exit with an error code not on this list.
  126.  
  127. 2 = bad arguments.  
  128.     NOTE: Do not exit with this error if the job could be printed.
  129.     Exit with this error only if the job could not be printed due to
  130.     the invalid arguments.
  131.  
  132. 8 = unprintable or unreadable files
  133.  
  134.  
  135.